#include <iostream>
using namespace std;
void solve()
{
    int a[3], b[3];
    for (int i = 0; i < 3; i++)
        cin >> a[i];
    for (int i = 0; i < 3; i++)
        cin >> b[i];
    sort(a, a + 3);
    sort(b, b + 3);
    if (b[2] > a[1] && b[1] > a[0])
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
}
int main()
{
    solve();
    return 0;
}